const TokenKey = 'App-Token'

export function getToken() {
  return uni.getStorageSync(TokenKey);
}

export function setToken(token) {
  uni.setStorageSync(TokenKey, token)
}

export function removeToken() {
  return uni.removeStorageSync(TokenKey)
}
export function getStorage(key) {
  return uni.getStorageSync(key)

}
export function setStorage(key, value) {
  uni.setStorageSync(key, value)
}
export function removeStorage(key) {
  return uni.removeStorageSync(key)
}

//获取本地存储中的某字段中的某一个值
export function getStorageItem(key, item) {
  let value = uni.getStorageSync(key)
  if (value) {
    return value[item]
  }
  return ''
}

